struct Solution {}

fn main() {}

impl Solution {
    pub fn count_key_changes(s: String) -> i32 {
        let sc = s.clone().to_lowercase();
        let mut ret = 0;
        for idx in 1..sc.len() {
            if sc.chars().nth(idx).unwrap() != sc.chars().nth(idx - 1).unwrap() {
                ret += 1;
            }
        }
        ret
    }
}
